package com.ithuang.quartz.domain;

import com.ithuang.quartz.utils.SpringUtils;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import static com.ithuang.quartz.utils.JobExecuteUtils.executeMethod;


/**
 * 定时任务处理（禁止并发执行）
 * @author HTT
 */
@DisallowConcurrentExecution
public class QuartzDisallowConcurrentExecution extends AbstractQuartzJob
{
    @Override
    protected void doExecute(JobExecutionContext jobExecutionContext) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        executeMethod(jobExecutionContext);
    }
}
